import {createRouter, createWebHistory} from 'vue-router'
import Home from '../pages/HomePage.vue'
import UserLogin from '../pages/UserLoginPage.vue'
import Interface from '../pages/InterfacePage.vue'
import User from '../pages/UserPage.vue'
import UserRegister from '../pages/UserRegister.vue'
import HomeContent from '../pages/HomeContent.vue'
import CallInterface from '../pages/CallInterfacePage.vue'
import Manual from '../pages/ManualPage.vue'
import Example from '../pages/ExamplePage.vue'
import UserEdit from '../pages/UserEditPage.vue'
import ChangeAvatar from '../pages/ChangeAvatar.vue'
import OJIndex from '../pages/oj/IndexPage.vue'
import OJProblem from '../pages/oj/ProblemPage.vue'
import OJRank from '../pages/oj/RankPage.vue'
import OJEvaluate from '../pages/oj/EvaluatePage.vue'



const routes=[{
  path:'/',
  component: Home,
  children:[
    {path:'/user',component: User},
    {path:'/interface',component: Interface},
    {path:'/manual',component: Manual},
    {path:'/content',component: HomeContent},
    {path:'/example',component: Example},
    {path:'/interface/call',component: CallInterface},
    {path:'/user/edit',component: UserEdit},
    {path:'/user/changeAvatar',component: ChangeAvatar},
    {path:'/oj/problem',component:OJProblem},
    {path:'/oj/index',component: OJIndex,},
    {path:'/oj/rank',component: OJRank,},
    {path:'/oj/evaluate',component: OJEvaluate,},
  ]
  },
  {path:'/user/login',component: UserLogin},
  {path:'/user/register',component: UserRegister},
  

]

export default createRouter({
  history: createWebHistory(),
  routes
})